/**
 * @author Wang Hai Long  [whailong2010@gmail.com]

 * @date Oct 9, 2014 9:09:02 AM
 */
package com.surent.model.dbmodel;

import com.avos.avoscloud.AVClassName;
import com.avos.avoscloud.AVFile;
import com.avos.avoscloud.AVObject;

/**
 * @author Wang Hai Long [whailong2010@gmail.com]
 * @date Oct 9, 2014 9:09:02 AM
 */

@AVClassName("Image")
public class Image extends AVObject {

	private AVFile imageFile;

	private House house;

	/**
	 * @param imageFile
	 * @param house
	 */
	public void initImage(AVFile imageFile, House house) {
		this.setImageFile(imageFile);
		this.setHouse(house);
	}

	public AVFile getImageFile() {
		return this.getAVFile("imageFile");
	}

	public House getHouse() {
		try {
			return this.getAVObject("house", House.class);
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	}

	public void setImageFile(AVFile imageFile) {
		this.put("imageFile", imageFile);
	}

	public void setHouse(House house) {
		this.put("house", house);
	}

	public Image() {
		super();
	}
}
